[[...path]].page.tsx 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524
  1. import React, { useEffect } from 'react';
  2. import EventEmitter from 'events';
  3. import {
  4. IDataWithMeta, IPageInfoForEntity, IPagePopulatedToShowRevision, isClient, pagePathUtils, pathUtils,
  5. } from '@growi/core';
  6. import ExtensibleCustomError from 'extensible-custom-error';
  7. import {
  8. NextPage, GetServerSideProps, GetServerSidePropsContext,
  9. } from 'next';
  10. import { serverSideTranslations } from 'next-i18next/serverSideTranslations';
  11. import dynamic from 'next/dynamic';
  12. import Head from 'next/head';
  13. import { useRouter } from 'next/router';
  14. import { PageAlerts } from '~/components/PageAlert/PageAlerts';
  15. // import { PageComments } from '~/components/PageComment/PageComments';
  16. // import { useTranslation } from '~/i18n';
  17. import { CrowiRequest } from '~/interfaces/crowi-request';
  18. // import { renderScriptTagByName, renderHighlightJsStyleTag } from '~/service/cdn-resources-loader';
  19. // import { useIndentSize } from '~/stores/editor';
  20. // import { useRendererSettings } from '~/stores/renderer';
  21. // import { EditorMode, useEditorMode, useIsMobile } from '~/stores/ui';
  22. import { CustomWindow } from '~/interfaces/global';
  23. import { RendererConfig } from '~/interfaces/services/renderer';
  24. import { ISidebarConfig } from '~/interfaces/sidebar-config';
  25. import { PageModel, PageDocument } from '~/server/models/page';
  26. import UserUISettings, { UserUISettingsDocument } from '~/server/models/user-ui-settings';
  27. import Xss from '~/services/xss';
  28. import { useSWRxCurrentPage, useSWRxPageInfo, useSWRxPage } from '~/stores/page';
  29. import {
  30. usePreferDrawerModeByUser, usePreferDrawerModeOnEditByUser, useSidebarCollapsed, useCurrentSidebarContents, useCurrentProductNavWidth,
  31. } from '~/stores/ui';
  32. import loggerFactory from '~/utils/logger';
  33. // import { isUserPage, isTrashPage, isSharedPage } from '~/utils/path-utils';
  34. // import GrowiSubNavigation from '../client/js/components/Navbar/GrowiSubNavigation';
  35. // import GrowiSubNavigationSwitcher from '../client/js/components/Navbar/GrowiSubNavigationSwitcher';
  36. import { BasicLayout } from '../components/Layout/BasicLayout';
  37. import GrowiContextualSubNavigation from '../components/Navbar/GrowiContextualSubNavigation';
  38. import DisplaySwitcher from '../components/Page/DisplaySwitcher';
  39. // import { serializeUserSecurely } from '../server/models/serializers/user-serializer';
  40. // import PageStatusAlert from '../client/js/components/PageStatusAlert';
  41. import {
  42. useCurrentUser, useCurrentPagePath,
  43. useIsLatestRevision,
  44. useIsForbidden, useIsNotFound, useIsTrashPage, useIsSharedUser,
  45. useIsEnabledStaleNotification, useIsIdenticalPath,
  46. useIsSearchServiceConfigured, useIsSearchServiceReachable, useDisableLinkSharing,
  47. useHackmdUri,
  48. useIsAclEnabled, useIsUserPage, useIsNotCreatable,
  49. useCsrfToken, useIsSearchScopeChildrenAsDefault, useCurrentPageId, useCurrentPathname,
  50. useIsSlackConfigured, useIsBlinkedHeaderAtBoot, useRendererConfig,
  51. } from '../stores/context';
  52. import { useXss } from '../stores/xss';
  53. import {
  54. CommonProps, getNextI18NextConfig, getServerSideCommonProps, useCustomTitle,
  55. } from './commons';
  56. // import { useCurrentPageSWR } from '../stores/page';
  57. const logger = loggerFactory('growi:pages:all');
  58. const {
  59. isPermalink: _isPermalink, isUsersHomePage, isTrashPage: _isTrashPage, isUserPage, isCreatablePage,
  60. } = pagePathUtils;
  61. const { removeHeadingSlash } = pathUtils;
  62. const IdenticalPathPage = (): JSX.Element => {
  63. const IdenticalPathPage = dynamic(() => import('../components/IdenticalPathPage').then(mod => mod.IdenticalPathPage), { ssr: false });
  64. return <IdenticalPathPage />;
  65. };
  66. const PutbackPageModal = (): JSX.Element => {
  67. const PutbackPageModal = dynamic(() => import('../components/PutbackPageModal'), { ssr: false });
  68. return <PutbackPageModal />;
  69. };
  70. type IPageToShowRevisionWithMeta = IDataWithMeta<IPagePopulatedToShowRevision, IPageInfoForEntity>;
  71. type Props = CommonProps & {
  72. currentUser: string,
  73. pageWithMetaStr: string,
  74. // pageUser?: any,
  75. // redirectTo?: string;
  76. // redirectFrom?: string;
  77. // shareLinkId?: string;
  78. isLatestRevision?: boolean
  79. isIdenticalPathPage?: boolean,
  80. isForbidden: boolean,
  81. isNotFound: boolean,
  82. IsNotCreatable: boolean,
  83. // isAbleToDeleteCompletely: boolean,
  84. isSearchServiceConfigured: boolean,
  85. isSearchServiceReachable: boolean,
  86. isSearchScopeChildrenAsDefault: boolean,
  87. isSlackConfigured: boolean,
  88. // isMailerSetup: boolean,
  89. isAclEnabled: boolean,
  90. // hasSlackConfig: boolean,
  91. // drawioUri: string,
  92. hackmdUri: string,
  93. // mathJax: string,
  94. // noCdn: string,
  95. // highlightJsStyle: string,
  96. // isAllReplyShown: boolean,
  97. // isContainerFluid: boolean,
  98. // editorConfig: any,
  99. isEnabledStaleNotification: boolean,
  100. // isEnabledLinebreaks: boolean,
  101. // isEnabledLinebreaksInComments: boolean,
  102. // adminPreferredIndentSize: number,
  103. // isIndentSizeForced: boolean,
  104. disableLinkSharing: boolean,
  105. rendererConfig: RendererConfig,
  106. // UI
  107. userUISettings: UserUISettingsDocument | null
  108. // Sidebar
  109. sidebarConfig: ISidebarConfig,
  110. };
  111. const GrowiPage: NextPage<Props> = (props: Props) => {
  112. // const { t } = useTranslation();
  113. const router = useRouter();
  114. const UnsavedAlertDialog = dynamic(() => import('./UnsavedAlertDialog'), { ssr: false });
  115. const GrowiSubNavigationSwitcher = dynamic(() => import('../components/Navbar/GrowiSubNavigationSwitcher'), { ssr: false });
  116. const { data: currentUser } = useCurrentUser(props.currentUser != null ? JSON.parse(props.currentUser) : null);
  117. // register global EventEmitter
  118. if (isClient()) {
  119. (window as CustomWindow).globalEmitter = new EventEmitter();
  120. }
  121. // commons
  122. useXss(new Xss());
  123. // useEditorConfig(props.editorConfig);
  124. useCsrfToken(props.csrfToken);
  125. // UserUISettings
  126. usePreferDrawerModeByUser(props.userUISettings?.preferDrawerModeByUser ?? props.sidebarConfig.isSidebarDrawerMode);
  127. usePreferDrawerModeOnEditByUser(props.userUISettings?.preferDrawerModeOnEditByUser);
  128. useSidebarCollapsed(props.userUISettings?.isSidebarCollapsed ?? props.sidebarConfig.isSidebarClosedAtDockMode);
  129. useCurrentSidebarContents(props.userUISettings?.currentSidebarContents);
  130. useCurrentProductNavWidth(props.userUISettings?.currentProductNavWidth);
  131. // page
  132. useCurrentPagePath(props.currentPathname);
  133. useIsLatestRevision(props.isLatestRevision);
  134. // useOwnerOfCurrentPage(props.pageUser != null ? JSON.parse(props.pageUser) : null);
  135. useIsForbidden(props.isForbidden);
  136. useIsNotFound(props.isNotFound);
  137. useIsNotCreatable(props.IsNotCreatable);
  138. // useIsTrashPage(_isTrashPage(props.currentPagePath));
  139. // useShared();
  140. // useShareLinkId(props.shareLinkId);
  141. useIsSharedUser(false); // this page cann't be routed for '/share'
  142. useIsIdenticalPath(false); // TODO: need to initialize from props
  143. // useIsAbleToDeleteCompletely(props.isAbleToDeleteCompletely);
  144. useIsEnabledStaleNotification(props.isEnabledStaleNotification);
  145. useIsBlinkedHeaderAtBoot(false);
  146. useIsSearchServiceConfigured(props.isSearchServiceConfigured);
  147. useIsSearchServiceReachable(props.isSearchServiceReachable);
  148. useIsSearchScopeChildrenAsDefault(props.isSearchScopeChildrenAsDefault);
  149. useIsSlackConfigured(props.isSlackConfigured);
  150. // useIsMailerSetup(props.isMailerSetup);
  151. useIsAclEnabled(props.isAclEnabled);
  152. // useHasSlackConfig(props.hasSlackConfig);
  153. // useDrawioUri(props.drawioUri);
  154. useHackmdUri(props.hackmdUri);
  155. // useMathJax(props.mathJax);
  156. // useNoCdn(props.noCdn);
  157. // useIndentSize(props.adminPreferredIndentSize);
  158. useDisableLinkSharing(props.disableLinkSharing);
  159. useRendererConfig(props.rendererConfig);
  160. // useRendererSettings(props.rendererSettingsStr != null ? JSON.parse(props.rendererSettingsStr) : undefined);
  161. // useGrowiRendererConfig(props.growiRendererConfigStr != null ? JSON.parse(props.growiRendererConfigStr) : undefined);
  162. // const { data: editorMode } = useEditorMode();
  163. let pageWithMeta: IPageToShowRevisionWithMeta | undefined;
  164. if (props.pageWithMetaStr != null) {
  165. pageWithMeta = JSON.parse(props.pageWithMetaStr) as IPageToShowRevisionWithMeta;
  166. }
  167. let shouldRenderPutbackPageModal = false;
  168. if (pageWithMeta != null) {
  169. shouldRenderPutbackPageModal = _isTrashPage(pageWithMeta.data.path);
  170. }
  171. useCurrentPageId(pageWithMeta?.data._id);
  172. useSWRxCurrentPage(undefined, pageWithMeta?.data); // store initial data
  173. // useSWRxPage(pageWithMeta?.data._id);
  174. useSWRxPageInfo(pageWithMeta?.data._id, undefined, pageWithMeta?.meta); // store initial data
  175. useIsTrashPage(_isTrashPage(pageWithMeta?.data.path ?? ''));
  176. useIsUserPage(isUserPage(pageWithMeta?.data.path ?? ''));
  177. useIsNotCreatable(props.isForbidden || !isCreatablePage(pageWithMeta?.data.path ?? '')); // TODO: need to include props.isIdentical
  178. useCurrentPagePath(pageWithMeta?.data.path);
  179. useCurrentPathname(props.currentPathname);
  180. // sync pathname by Shallow Routing https://nextjs.org/docs/routing/shallow-routing
  181. useEffect(() => {
  182. if (isClient() && window.location.pathname !== props.currentPathname) {
  183. router.replace(props.currentPathname, undefined, { shallow: true });
  184. }
  185. }, [props.currentPathname, router]);
  186. const classNames: string[] = [];
  187. // switch (editorMode) {
  188. // case EditorMode.Editor:
  189. // classNames.push('on-edit', 'builtin-editor');
  190. // break;
  191. // case EditorMode.HackMD:
  192. // classNames.push('on-edit', 'hackmd');
  193. // break;
  194. // }
  195. // if (props.isContainerFluid) {
  196. // classNames.push('growi-layout-fluid');
  197. // }
  198. // if (page == null) {
  199. // classNames.push('not-found-page');
  200. // }
  201. return (
  202. <>
  203. <Head>
  204. {/*
  205. {renderScriptTagByName('drawio-viewer')}
  206. {renderScriptTagByName('mathjax')}
  207. {renderScriptTagByName('highlight-addons')}
  208. {renderHighlightJsStyleTag(props.highlightJsStyle)}
  209. */}
  210. </Head>
  211. {/* <BasicLayout title={useCustomTitle(props, t('GROWI'))} className={classNames.join(' ')}> */}
  212. <BasicLayout title={useCustomTitle(props, 'GROWI')} className={classNames.join(' ')}>
  213. <header className="py-0">
  214. <GrowiContextualSubNavigation isLinkSharingDisabled={props.disableLinkSharing} />
  215. </header>
  216. <div className="d-edit-none">
  217. <GrowiSubNavigationSwitcher />
  218. </div>
  219. <div id="grw-subnav-sticky-trigger" className="sticky-top"></div>
  220. <div id="grw-fav-sticky-trigger" className="sticky-top"></div>
  221. <div id="main" className={`main ${isUsersHomePage(props.currentPathname) && 'user-page'}`}>
  222. <div id="content-main" className="content-main grw-container-convertible">
  223. <div className="row">
  224. <div className="col">
  225. { props.isIdenticalPathPage && <IdenticalPathPage /> }
  226. { !props.isIdenticalPathPage && (
  227. <>
  228. <PageAlerts />
  229. { props.isForbidden
  230. ? <>ForbiddenPage</>
  231. : <DisplaySwitcher />
  232. }
  233. <div id="page-editor-navbar-bottom-container" className="d-none d-edit-block"></div>
  234. {/* <PageStatusAlert /> */}
  235. PageStatusAlert
  236. </>
  237. ) }
  238. </div>
  239. </div>
  240. {/* <div className="col-xl-2 col-lg-3 d-none d-lg-block revision-toc-container">
  241. <div id="revision-toc" className="revision-toc mt-3 sps sps--abv" data-sps-offset="123">
  242. <div id="revision-toc-content" className="revision-toc-content"></div>
  243. </div>
  244. </div> */}
  245. </div>
  246. </div>
  247. <footer>
  248. {/* <PageComments /> */}
  249. PageComments
  250. </footer>
  251. <UnsavedAlertDialog />
  252. {shouldRenderPutbackPageModal && <PutbackPageModal />}
  253. </BasicLayout>
  254. </>
  255. );
  256. };
  257. function getPageIdFromPathname(currentPathname: string): string | null {
  258. return _isPermalink(currentPathname) ? removeHeadingSlash(currentPathname) : null;
  259. }
  260. class MultiplePagesHitsError extends ExtensibleCustomError {
  261. pagePath: string;
  262. constructor(pagePath: string) {
  263. super(`MultiplePagesHitsError occured by '${pagePath}'`);
  264. this.pagePath = pagePath;
  265. }
  266. }
  267. async function getPageData(context: GetServerSidePropsContext, props: Props): Promise<IPageToShowRevisionWithMeta|null> {
  268. const req: CrowiRequest = context.req as CrowiRequest;
  269. const { crowi } = req;
  270. const { revisionId } = req.query;
  271. const Page = crowi.model('Page') as PageModel;
  272. const { pageService } = crowi;
  273. const { currentPathname } = props;
  274. const pageId = getPageIdFromPathname(currentPathname);
  275. const isPermalink = _isPermalink(currentPathname);
  276. const { user } = req;
  277. // check whether the specified page path hits to multiple pages
  278. if (!isPermalink) {
  279. const count = await Page.countByPathAndViewer(currentPathname, user, null, true);
  280. if (count > 1) {
  281. throw new MultiplePagesHitsError(currentPathname);
  282. }
  283. }
  284. const result: IPageToShowRevisionWithMeta = await pageService.findPageAndMetaDataByViewer(pageId, currentPathname, user, true); // includeEmpty = true, isSharedPage = false
  285. const page = result?.data as unknown as PageDocument;
  286. // populate & check if the revision is latest
  287. if (page != null) {
  288. page.initLatestRevisionField(revisionId);
  289. await page.populateDataToShowRevision();
  290. props.isLatestRevision = page.isLatestRevision();
  291. }
  292. return result;
  293. }
  294. async function injectRoutingInformation(context: GetServerSidePropsContext, props: Props, pageWithMeta: IPageToShowRevisionWithMeta|null): Promise<void> {
  295. const req: CrowiRequest = context.req as CrowiRequest;
  296. const { crowi } = req;
  297. const Page = crowi.model('Page') as PageModel;
  298. const { currentPathname } = props;
  299. const pageId = getPageIdFromPathname(currentPathname);
  300. const isPermalink = _isPermalink(currentPathname);
  301. const page = pageWithMeta?.data;
  302. if (props.isIdenticalPathPage) {
  303. // TBD
  304. }
  305. else if (page == null) {
  306. props.isNotFound = true;
  307. props.IsNotCreatable = !isCreatablePage(currentPathname);
  308. // check the page is forbidden or just does not exist.
  309. const count = isPermalink ? await Page.count({ _id: pageId }) : await Page.count({ path: currentPathname });
  310. props.isForbidden = count > 0;
  311. }
  312. else {
  313. // /62a88db47fed8b2d94f30000 ==> /path/to/page
  314. if (isPermalink && page.isEmpty) {
  315. props.currentPathname = page.path;
  316. }
  317. // /path/to/page ==> /62a88db47fed8b2d94f30000
  318. if (!isPermalink && !page.isEmpty) {
  319. const isToppage = pagePathUtils.isTopPage(props.currentPathname);
  320. if (!isToppage) {
  321. props.currentPathname = `/${page._id}`;
  322. }
  323. }
  324. }
  325. }
  326. // async function injectPageUserInformation(context: GetServerSidePropsContext, props: Props): Promise<void> {
  327. // const req: CrowiRequest = context.req as CrowiRequest;
  328. // const { crowi } = req;
  329. // const UserModel = crowi.model('User');
  330. // if (isUserPage(props.currentPagePath)) {
  331. // const user = await UserModel.findUserByUsername(UserModel.getUsernameByPath(props.currentPagePath));
  332. // if (user != null) {
  333. // props.pageUser = JSON.stringify(user.toObject());
  334. // }
  335. // }
  336. // }
  337. async function injectServerConfigurations(context: GetServerSidePropsContext, props: Props): Promise<void> {
  338. const req: CrowiRequest = context.req as CrowiRequest;
  339. const { crowi } = req;
  340. const {
  341. appService, searchService, configManager, aclService, slackNotificationService, mailService,
  342. } = crowi;
  343. props.isSearchServiceConfigured = searchService.isConfigured;
  344. props.isSearchServiceReachable = searchService.isReachable;
  345. props.isSearchScopeChildrenAsDefault = configManager.getConfig('crowi', 'customize:isSearchScopeChildrenAsDefault');
  346. props.isSlackConfigured = crowi.slackIntegrationService.isSlackConfigured;
  347. // props.isMailerSetup = mailService.isMailerSetup;
  348. props.isAclEnabled = aclService.isAclEnabled();
  349. // props.hasSlackConfig = slackNotificationService.hasSlackConfig();
  350. // props.drawioUri = configManager.getConfig('crowi', 'app:drawioUri');
  351. props.hackmdUri = configManager.getConfig('crowi', 'app:hackmdUri');
  352. // props.mathJax = configManager.getConfig('crowi', 'app:mathJax');
  353. // props.noCdn = configManager.getConfig('crowi', 'app:noCdn');
  354. // props.highlightJsStyle = configManager.getConfig('crowi', 'customize:highlightJsStyle');
  355. // props.isAllReplyShown = configManager.getConfig('crowi', 'customize:isAllReplyShown');
  356. // props.isContainerFluid = configManager.getConfig('crowi', 'customize:isContainerFluid');
  357. props.isEnabledStaleNotification = configManager.getConfig('crowi', 'customize:isEnabledStaleNotification');
  358. // props.isEnabledLinebreaks = configManager.getConfig('markdown', 'markdown:isEnabledLinebreaks');
  359. // props.isEnabledLinebreaksInComments = configManager.getConfig('markdown', 'markdown:isEnabledLinebreaksInComments');
  360. props.disableLinkSharing = configManager.getConfig('crowi', 'security:disableLinkSharing');
  361. // props.editorConfig = {
  362. // upload: {
  363. // image: crowi.fileUploadService.getIsUploadable(),
  364. // file: crowi.fileUploadService.getFileUploadEnabled(),
  365. // },
  366. // };
  367. // props.adminPreferredIndentSize = configManager.getConfig('markdown', 'markdown:adminPreferredIndentSize');
  368. // props.isIndentSizeForced = configManager.getConfig('markdown', 'markdown:isIndentSizeForced');
  369. props.rendererConfig = {
  370. isEnabledLinebreaks: configManager.getConfig('markdown', 'markdown:isEnabledLinebreaks'),
  371. isEnabledLinebreaksInComments: configManager.getConfig('markdown', 'markdown:isEnabledLinebreaksInComments'),
  372. adminPreferredIndentSize: configManager.getConfig('markdown', 'markdown:adminPreferredIndentSize'),
  373. isIndentSizeForced: configManager.getConfig('markdown', 'markdown:isIndentSizeForced'),
  374. plantumlUri: process.env.PLANTUML_URI ?? null,
  375. blockdiagUri: process.env.BLOCKDIAG_URI ?? null,
  376. // XSS Options
  377. isEnabledXssPrevention: configManager.getConfig('markdown', 'markdown:xss:isEnabledPrevention'),
  378. attrWhiteList: crowi.xssService.getAttrWhiteList(),
  379. tagWhiteList: crowi.xssService.getTagWhiteList(),
  380. highlightJsStyleBorder: crowi.configManager.getConfig('crowi', 'customize:highlightJsStyleBorder'),
  381. };
  382. props.sidebarConfig = {
  383. isSidebarDrawerMode: configManager.getConfig('crowi', 'customize:isSidebarDrawerMode'),
  384. isSidebarClosedAtDockMode: configManager.getConfig('crowi', 'customize:isSidebarClosedAtDockMode'),
  385. };
  386. }
  387. /**
  388. * for Server Side Translations
  389. * @param context
  390. * @param props
  391. * @param namespacesRequired
  392. */
  393. async function injectNextI18NextConfigurations(context: GetServerSidePropsContext, props: Props, namespacesRequired?: string[] | undefined): Promise<void> {
  394. const nextI18NextConfig = await getNextI18NextConfig(serverSideTranslations, context, namespacesRequired);
  395. props._nextI18Next = nextI18NextConfig._nextI18Next;
  396. }
  397. export const getServerSideProps: GetServerSideProps = async(context: GetServerSidePropsContext) => {
  398. const req: CrowiRequest = context.req as CrowiRequest;
  399. const { user } = req;
  400. const result = await getServerSideCommonProps(context);
  401. // check for presence
  402. // see: https://github.com/vercel/next.js/issues/19271#issuecomment-730006862
  403. if (!('props' in result)) {
  404. throw new Error('invalid getSSP result');
  405. }
  406. const props: Props = result.props as Props;
  407. let pageWithMeta;
  408. try {
  409. pageWithMeta = await getPageData(context, props);
  410. props.pageWithMetaStr = JSON.stringify(pageWithMeta);
  411. }
  412. catch (err) {
  413. if (err instanceof MultiplePagesHitsError) {
  414. props.isIdenticalPathPage = true;
  415. }
  416. else {
  417. throw err;
  418. }
  419. }
  420. injectRoutingInformation(context, props, pageWithMeta);
  421. injectServerConfigurations(context, props);
  422. injectNextI18NextConfigurations(context, props, ['translation']);
  423. if (user != null) {
  424. props.currentUser = JSON.stringify(user);
  425. }
  426. // UI
  427. const userUISettings = user == null ? null : await UserUISettings.findOne({ user: user._id }).exec();
  428. props.userUISettings = JSON.parse(JSON.stringify(userUISettings));
  429. return {
  430. props,
  431. };
  432. };
  433. export default GrowiPage;